#pragma once
#include <iostream>
using std::cout;
using std::cin;
using std::endl;
using std::ostream;
using std::istream;

class Date
{
	friend ostream& operator<<(ostream& out, const Date& d);
	friend istream& operator>>(istream& in, Date& d);
public:
	Date(int year = 0, int month = 1, int day = 1);
	Date(const Date& d);
	int GetMonthDate(int year, int month) const;
	bool IsCorrectDate(int year, int month, int day) const;
	bool operator==(const Date& d) const;
	bool operator>(const Date& d) const;
	bool operator>=(const Date& d) const;
	bool operator<(const Date& d) const;
	bool operator<=(const Date& d) const;
	bool operator!=(const Date& d) const;
	Date& operator=(const Date& d);
	Date operator+(const int day) const;
	Date& operator+=(const int day);
	Date operator-(const int day) const;
	Date& operator-=(const int day);
	Date& operator++(void);
	Date operator++(int);
	Date& operator--(void);
	Date operator--(int);
	int operator-(const Date d) const;
	Date* operator&();
	const Date* operator&() const;
	~Date();

private:
	int _year;
	int _month;
	int _day;

};